home *** CD-ROM | disk | FTP | other *** search
- // Ultimate client-side JavaScript client sniff. Version 3.01
- // (C) Netscape Communications 1999-2001. Permission granted to reuse and distribute.
-
- // convert all characters to lowercase to simplify testing
- var agt=navigator.userAgent.toLowerCase();
-
- // *** BROWSER VERSION ***
- // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
- var is_major = parseInt(navigator.appVersion);
- var is_minor = parseFloat(navigator.appVersion);
-
- // Note: Opera and WebTV spoof Navigator. We do strict client detection.
- // If you want to allow spoofing, take out the tests for opera and webtv.
- var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
- && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
- && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
- var is_nav2 = (is_nav && (is_major == 2));
- var is_nav3 = (is_nav && (is_major == 3));
- var is_nav4 = (is_nav && (is_major == 4));
- var is_nav4up = (is_nav && (is_major >= 4));
- var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) ||
- (agt.indexOf("; nav") != -1)) );
- var is_nav6 = (is_nav && (is_major == 5));
- var is_nav6up = (is_nav && (is_major >= 5));
- var is_gecko = (agt.indexOf('gecko') != -1);
-
- var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
- var is_ie3 = (is_ie && (is_major < 4));
- var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
- var is_ie4up = (is_ie && (is_major >= 4));
- var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
- var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
- var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
- var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
- var is_mac = (agt.indexOf("mac")!=-1);
-
- /*
- Copyright (c) 2001 Moonstone Interactive, Inc.
- All Rights Reserved. No portion of this file, including but
- not limited to any associated code, documents or images, may be
- copied, retransmitted, reposted, duplicated or otherwise
- used without the express written permission of Moonstone Interactive, Inc.
-
- */
-
- rollover = document.images;
- function LoadGIF(image) {
- if (rollover) {
- eval (image + '= new Image()'); // Let browser do GC
- eval (image + '.src = "/img/' + image + '.gif"');
- }
- }
- // takes to arguments html element name and giff name
- function SwapImage(name, image) {
- if (rollover) {
- document[name].src = eval(image + '.src');
- }
- }
-
- LoadGIF('global_nav_home_on');
- LoadGIF('global_nav_home');
- LoadGIF('global_nav_products_on');
- LoadGIF('global_nav_products');
- LoadGIF('global_nav_warranties_on');
- LoadGIF('global_nav_warranties');
- LoadGIF('global_nav_partners_on');
- LoadGIF('global_nav_partners');
- LoadGIF('global_nav_news_on');
- LoadGIF('global_nav_news');
- LoadGIF('global_nav_about_on');
- LoadGIF('global_nav_about');
- LoadGIF('global_footer_contact_on');
- LoadGIF('global_footer_contact_static');
- LoadGIF('global_footer_termspriv_on');
- LoadGIF('global_footer_termspriv_static');
-
-
- //This is for opening child windows
- /*Example Tag:
- <a onclick="openChildWin('http://www.sitename.com');return false;" href="#">www.sitename.com</a>
- */
- var childWin;
- function closeChildWin() {
- if(childWin != null && !childWin.closed) childWin.close();
- }
-
- function openChildWin(aUrl){
- closeChildWin();
- childWin = open(aUrl, "childwindow", "resizable=1,location=1,status=1,menubar=1,toolbar=1,scrollbars=1,width=790,height=500,left=0,top=0,screenX=0,screenY=0");
- }